import java.awt.Color;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.geom.Rectangle2D;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import org.rsbot.script.ScriptManifest;
import org.rsbot.script.methods.Game;
import org.rsbot.script.methods.Skills;

class WhiteBearAIOMagic$WhiteBearPaint
{
  Rectangle clr1;
  Rectangle clr2;
  Rectangle clr3;
  Rectangle clr4;
  Rectangle clr5;
  Rectangle clr6;
  Rectangle cr1;
  Rectangle logOut;
  Rectangle logOut2;
  Rectangle logOutYes;
  Rectangle logOutNo;
  Rectangle r;
  Rectangle r1;
  Rectangle r2;
  Rectangle r3;
  Rectangle r4;
  Rectangle r5;
  Rectangle r6;
  Rectangle r2c;
  Rectangle r3c;
  Rectangle r4c;
  Rectangle r5c;
  Rectangle r6c;
  Rectangle sb1;
  boolean savedStats;
  boolean antialias;
  int currentTab;
  int lastTab;
  int start_exp;
  int start_lvl;
  int gained_exp;
  int gained_lvl;
  int paintX;
  int paintY;
  Point p;
  Color fonts;
  Color normalBack;
  Color hiddenPaint;
  Color lines;
  String font;
  Thread mouseWatcher;
  final NumberFormat nf;
  long time_ScriptStart;
  long runTime;

  private WhiteBearAIOMagic$WhiteBearPaint(WhiteBearAIOMagic paramWhiteBearAIOMagic)
  {
    this.clr1 = new Rectangle(210, 43, 15, 15);
    this.clr2 = new Rectangle(227, 43, 15, 15);
    this.clr3 = new Rectangle(244, 43, 15, 15);
    this.clr4 = new Rectangle(261, 43, 15, 15);
    this.clr5 = new Rectangle(278, 43, 15, 15);
    this.clr6 = new Rectangle(295, 43, 15, 15);
    this.cr1 = new Rectangle(210, 61, 15, 15);
    this.logOut = new Rectangle(295, 79, 55, 15);
    this.logOut2 = new Rectangle(320, 220, 200, 70);
    this.logOutYes = new Rectangle(338, 255, 80, 20);
    this.logOutNo = new Rectangle(423, 255, 80, 20);

    this.r = new Rectangle(7, 345, 408, 114);
    this.r1 = new Rectangle(420, 345, 77, 20);
    this.r2 = new Rectangle(420, 369, 77, 20);
    this.r3 = new Rectangle(420, 392, 77, 20);
    this.r4 = new Rectangle(420, 415, 77, 20);
    this.r5 = new Rectangle(420, 439, 77, 20);
    this.r6 = new Rectangle(420, 439, 77, 20);
    this.r2c = new Rectangle(415, 369, 5, 20);
    this.r3c = new Rectangle(415, 392, 5, 20);
    this.r4c = new Rectangle(415, 415, 5, 20);
    this.r5c = new Rectangle(415, 439, 5, 20);
    this.r6c = new Rectangle(415, 439, 5, 20);

    this.sb1 = new Rectangle(12, 370, 398, 16);
    this.savedStats = false; this.antialias = false;
    this.currentTab = 0; this.lastTab = 0;
    this.start_exp = 0; this.start_lvl = 0;
    this.gained_exp = 0; this.gained_lvl = 0;
    this.paintX = 7; this.paintY = 344;
    this.p = new Point(0, 0);

    this.font = "sansserif";

    this.mouseWatcher = new Thread();
    this.nf = NumberFormat.getInstance();

    this.time_ScriptStart = System.currentTimeMillis();
    this.runTime = (System.currentTimeMillis() - this.time_ScriptStart);
  }

  public void proggiePaint(Graphics paramGraphics) {
    Calendar localCalendar = Calendar.getInstance();
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    String str = localSimpleDateFormat.format(localCalendar.getTime());
    if ((this.paintX <= 140) && (this.paintY <= 86))
    {
      paramGraphics.setFont(new Font(this.font, 0, 12));
      paramGraphics.setColor(this.normalBack);
      paramGraphics.fillRect(7, 235, 133, 76);
      paramGraphics.setColor(this.fonts);
      paramGraphics.drawString(str, 17, 257);
      paramGraphics.drawString("Version " + Double.toString(this.this$0.properties.version()), 17, 279);

      paramGraphics.drawString("Magic Level: " + WhiteBearAIOMagic.access$1000(this.this$0).getCurrentLevel(6), 17, 301);
    }
    else
    {
      paramGraphics.setFont(new Font(this.font, 0, 12));
      paramGraphics.setColor(this.normalBack);
      paramGraphics.fillRect(7, 10, 133, 76);
      paramGraphics.setColor(this.fonts);
      paramGraphics.drawString(str, 17, 32);
      paramGraphics.drawString("Version " + Double.toString(this.this$0.properties.version()), 17, 54);

      paramGraphics.drawString("Magic Level: " + WhiteBearAIOMagic.access$1100(this.this$0).getCurrentLevel(6), 17, 76);
    }
  }

  public void paint(Graphics paramGraphics)
  {
    this.r = new Rectangle(this.paintX, this.paintY, 408, 114);
    this.r1 = new Rectangle(this.paintX + 393, this.paintY + 117, 15, 18);
    this.r2 = new Rectangle(this.paintX + 181, this.paintY + 117, 40, 18);
    this.r3 = new Rectangle(this.paintX + 225, this.paintY + 117, 35, 18);
    this.r4 = new Rectangle(this.paintX + 264, this.paintY + 117, 40, 18);
    this.r5 = new Rectangle(this.paintX + 308, this.paintY + 117, 30, 18);
    this.r6 = new Rectangle(this.paintX + 343, this.paintY + 117, 45, 18);
    this.r2c = new Rectangle(this.paintX + 181, this.paintY + 114, 40, 3);
    this.r3c = new Rectangle(this.paintX + 225, this.paintY + 114, 35, 3);
    this.r4c = new Rectangle(this.paintX + 264, this.paintY + 114, 40, 3);
    this.r5c = new Rectangle(this.paintX + 308, this.paintY + 114, 30, 3);
    this.r6c = new Rectangle(this.paintX + 343, this.paintY + 114, 45, 3);

    this.sb1 = new Rectangle(this.paintX + 5, this.paintY + 25, 398, 16);
    this.clr1 = new Rectangle(this.paintX + 15, this.paintY + 43, 15, 15);
    this.clr2 = new Rectangle(this.paintX + 32, this.paintY + 43, 15, 15);
    this.clr3 = new Rectangle(this.paintX + 49, this.paintY + 43, 15, 15);
    this.clr4 = new Rectangle(this.paintX + 66, this.paintY + 43, 15, 15);
    this.clr5 = new Rectangle(this.paintX + 83, this.paintY + 43, 15, 15);
    this.clr6 = new Rectangle(this.paintX + 100, this.paintY + 43, 15, 15);
    this.cr1 = new Rectangle(this.paintX + 15, this.paintY + 61, 15, 15);
    this.logOut = new Rectangle(this.paintX + 100, this.paintY + 79, 55, 15);

    paramGraphics.setFont(new Font(this.font, 0, 12));
    if (WhiteBearAIOMagic.access$1200(this.this$0) == 1) {
      paramGraphics.setColor(new Color(0, 0, 0, 100));
      paramGraphics.fillRect(this.logOut2.x, this.logOut2.y, this.logOut2.width, this.logOut2.height);
      paramGraphics.setColor(Color.WHITE);
      paramGraphics.drawString("Logout: Are you sure?", this.logOut2.x + 10, this.logOut2.y + 22);

      paramGraphics.setColor(Color.RED);
      paramGraphics.fillRect(this.logOutYes.x, this.logOutYes.y, this.logOutYes.width, this.logOutYes.height);

      paramGraphics.setColor(Color.GREEN);
      paramGraphics.fillRect(this.logOutNo.x, this.logOutNo.y, this.logOutNo.width, this.logOutNo.height);

      paramGraphics.setColor(Color.BLACK);
      paramGraphics.drawString("YES", this.logOutYes.x + 28, this.logOutYes.y + 14);
      paramGraphics.drawString("NO", this.logOutNo.x + 29, this.logOutNo.y + 14);
    }

    this.runTime = (System.currentTimeMillis() - this.time_ScriptStart);
    WhiteBearAIOMagic.access$1302(this.this$0, formatTime((int)this.runTime));

    this.currentTab = paintTab();

    DecimalFormat localDecimalFormat = new DecimalFormat("#,###,###");

    if (WhiteBearAIOMagic.access$1400(this.this$0).getClientState() == 10) {
      WhiteBearAIOMagic.access$1502(this.this$0, WhiteBearAIOMagic.access$1600(this.this$0).getCurrentExp(6) - this.start_exp);
    }

    switch (this.currentTab) {
    case -1:
      paramGraphics.setColor(this.hiddenPaint);
      paramGraphics.fillRect(this.r1.x, this.r1.y, this.r1.width, this.r1.height);
      paramGraphics.setColor(this.fonts);
      drawString(paramGraphics, "O", this.r1, 5);
      break;
    case 0:
      drawPaint(paramGraphics, this.r2c);
      paramGraphics.setColor(this.lines);
      paramGraphics.drawLine(this.r.x + 204, this.r.y + 22, this.r.x + 204, this.r.y + 109);
      paramGraphics.setColor(this.fonts);
      paramGraphics.setFont(new Font(this.font, 1, 14));
      drawString(paramGraphics, this.this$0.properties.name(), this.r, -40);
      paramGraphics.setFont(new Font(this.font, 0, 12));
      drawStringMain(paramGraphics, "Runtime: ", WhiteBearAIOMagic.access$1300(this.this$0), this.r, 20, 35, 0, true);
      drawStringMain(paramGraphics, "", WhiteBearAIOMagic.access$1700(this.this$0), this.r, 20, 35, 0, false);
      int i = 0;
      int j = 0;
      WhiteBearAIOMagic.access$1502(this.this$0, WhiteBearAIOMagic.access$1800(this.this$0) + 0.0D);
      if (this.runTime / 1000L > 0L) {
        i = (int)(3600000.0D / this.runTime * WhiteBearAIOMagic.access$1900(this.this$0));
        j = (int)(3600000.0D / this.runTime * (WhiteBearAIOMagic.access$1800(this.this$0) + 0.0D));
      }
      drawStringMain(paramGraphics, "Casts ", localDecimalFormat.format(WhiteBearAIOMagic.access$1900(this.this$0)), this.r, 20, 35, 2, true);

      drawStringMain(paramGraphics, "Casts / Hour: ", localDecimalFormat.format(i), this.r, 20, 35, 3, true);

      drawStringMain(paramGraphics, "EXP Gained: ", localDecimalFormat.format(()(WhiteBearAIOMagic.access$1800(this.this$0) + 0.0D)), this.r, 20, 35, 2, false);

      drawStringMain(paramGraphics, "EXP / Hour: ", localDecimalFormat.format(j), this.r, 20, 35, 3, false);

      break;
    case 1:
      drawPaint(paramGraphics, this.r3c);
      paramGraphics.setColor(this.lines);
      paramGraphics.drawLine(this.r.x + 204, this.r.y + 22, this.r.x + 204, this.r.y + 109);
      paramGraphics.setColor(this.fonts);
      paramGraphics.setFont(new Font(this.font, 1, 14));
      drawString(paramGraphics, this.this$0.properties.name(), this.r, -40);
      paramGraphics.setFont(new Font(this.font, 0, 12));
      drawStringMain(paramGraphics, "Version: ", Double.toString(this.this$0.properties.version()), this.r, 20, 35, 0, true);

      if (WhiteBearAIOMagic.access$2000(this.this$0) == true) {
        if (WhiteBearAIOMagic.access$2100(this.this$0) != 8) {
          drawStringMain(paramGraphics, "Amt of " + WhiteBearAIOMagic.access$2200(this.this$0) + " in Bank:", "", this.r, 20, 35, 2, true);

          drawStringMain(paramGraphics, "", localDecimalFormat.format(WhiteBearAIOMagic.access$2300(this.this$0)), this.r, 20, 35, 3, true);

          drawStringMain(paramGraphics, "Worth:", localDecimalFormat.format(WhiteBearAIOMagic.access$2300(this.this$0) * WhiteBearAIOMagic.access$2400(this.this$0)), this.r, 20, 35, 4, true);
        }

        drawStringMain(paramGraphics, WhiteBearAIOMagic.access$2200(this.this$0) + " Prices", "", this.r, 20, 35, 0, false);

        drawStringMain(paramGraphics, "Price Guide:", Integer.toString(WhiteBearAIOMagic.access$2400(this.this$0)) + " coins", this.r, 20, 35, 2, false);
      }
      else
      {
        drawStringMain(paramGraphics, "Prices not loaded!", "", this.r, 20, 35, 0, false);
      }

      break;
    case 2:
      drawPaint(paramGraphics, this.r4c);
      paramGraphics.setColor(this.lines);
      paramGraphics.drawLine(this.r.x + 204, this.r.y + 43, this.r.x + 204, this.r.y + 109);
      drawStats(paramGraphics);
      paramGraphics.setColor(this.fonts);
      paramGraphics.setFont(new Font(this.font, 1, 14));
      drawString(paramGraphics, this.this$0.properties.name(), this.r, -40);
      paramGraphics.setFont(new Font(this.font, 0, 12));
      int k = WhiteBearAIOMagic.access$2500(this.this$0).getExpToNextLevel(6);
      int m = (int)(3600000.0D / this.runTime * this.gained_exp);
      int n = (int)(k / m * 3600000.0D);
      drawStringMain(paramGraphics, "Current Level:", WhiteBearAIOMagic.access$2600(this.this$0).getCurrentLevel(6) + "", this.r, 20, 35, 2, true);

      drawStringMain(paramGraphics, "Level Gained:", this.gained_lvl + " lvl", this.r, 20, 35, 3, true);

      drawStringMain(paramGraphics, "Time to Lvl:", formatTime(n), this.r, 20, 35, 4, true);

      drawStringMain(paramGraphics, "XP Gained:", localDecimalFormat.format(this.gained_exp) + "xp", this.r, 20, 35, 2, false);

      drawStringMain(paramGraphics, "XP / Hour:", localDecimalFormat.format(m) + "xp", this.r, 20, 35, 3, false);

      drawStringMain(paramGraphics, "XP to Lvl:", localDecimalFormat.format(k) + "xp", this.r, 20, 35, 4, false);

      break;
    case 3:
      drawPaint(paramGraphics, this.r5c);
      paramGraphics.setColor(this.lines);
      paramGraphics.drawLine(this.r.x + 204, this.r.y + 22, this.r.x + 204, this.r.y + 109);
      paramGraphics.setColor(this.fonts);
      paramGraphics.setFont(new Font(this.font, 1, 14));
      drawString(paramGraphics, this.this$0.properties.name(), this.r, -40);
      paramGraphics.setFont(new Font(this.font, 0, 12));
      if (WhiteBearAIOMagic.access$2700(this.this$0) == true) {
        if (WhiteBearAIOMagic.access$2800(this.this$0) == true) {
          drawStringMain(paramGraphics, "Break Distance:", "Random", this.r, 20, 35, 0, true);

          drawStringMain(paramGraphics, "Break Length:", "Random", this.r, 20, 35, 1, true);
        }
        else {
          drawStringMain(paramGraphics, "Break Distance:", Integer.toString(WhiteBearAIOMagic.access$2900(this.this$0)) + " ±" + Integer.toString(WhiteBearAIOMagic.access$3000(this.this$0)), this.r, 20, 35, 0, true);

          drawStringMain(paramGraphics, "Break Length:", Integer.toString(WhiteBearAIOMagic.access$3100(this.this$0)) + " ±" + Integer.toString(WhiteBearAIOMagic.access$3200(this.this$0)), this.r, 20, 35, 1, true);
        }

        drawStringMain(paramGraphics, "Next Break:", formatTime((int)(WhiteBearAIOMagic.access$3300(this.this$0) - System.currentTimeMillis())), this.r, 20, 35, 3, true);

        drawStringMain(paramGraphics, "Break Length:", formatTime((int)WhiteBearAIOMagic.access$3400(this.this$0)), this.r, 20, 35, 4, true);
      }
      else {
        drawStringMain(paramGraphics, "Breaking is disabled!", "", this.r, 20, 35, 0, true);
      }

      drawStringMain(paramGraphics, "Camera Turns:", Integer.toString(WhiteBearAIOMagic.access$3500(this.this$0)), this.r, 20, 35, 0, false);

      if (WhiteBearAIOMagic.access$3600(this.this$0)) {
        drawStringMain(paramGraphics, "Chat Response:", Integer.toString(WhiteBearAIOMagic.access$3700(this.this$0)), this.r, 20, 35, 3, false);
      }
      else {
        drawStringMain(paramGraphics, "Chat Responder is disabled!", "", this.r, 20, 35, 3, false);
      }

      if (WhiteBearAIOMagic.access$3800(this.this$0)) {
        drawStringMain(paramGraphics, "Remote Control:", "Enabled", this.r, 20, 35, 4, false);
      }
      else {
        drawStringMain(paramGraphics, "Remote Control is disabled!", "", this.r, 20, 35, 4, false);
      }

      break;
    case 4:
      drawPaint(paramGraphics, this.r6c);
      paramGraphics.setColor(this.lines);
      paramGraphics.drawLine(this.r.x + 204, this.r.y + 22, this.r.x + 204, this.r.y + 109);
      paramGraphics.setColor(this.fonts);
      paramGraphics.setFont(new Font(this.font, 1, 14));
      drawString(paramGraphics, this.this$0.properties.name(), this.r, -40);
      paramGraphics.setFont(new Font(this.font, 0, 12));
      paramGraphics.setColor(Color.WHITE);
      paramGraphics.drawString("Settings", this.paintX + 15, this.paintY + 31);
      if (WhiteBearAIOMagic.access$3600(this.this$0) == true) {
        paramGraphics.setColor(Color.GREEN);
        paramGraphics.drawString("Chat Responder ON", this.cr1.x + 19, this.cr1.y + 13);
      } else {
        paramGraphics.setColor(Color.RED);
        paramGraphics.drawString("Chat Responder OFF", this.cr1.x + 19, this.cr1.y + 13);
      }
      paramGraphics.setColor(new Color(0, 0, 0, 190));
      paramGraphics.fillRect(this.clr1.x, this.clr1.y, this.clr1.width, this.clr1.height);
      paramGraphics.fillRect(this.cr1.x, this.cr1.y, this.cr1.width, this.cr1.height);
      paramGraphics.setColor(new Color(0, 0, 70, 190));
      paramGraphics.fillRect(this.clr2.x, this.clr2.y, this.clr2.width, this.clr2.height);
      paramGraphics.setColor(new Color(0, 70, 0, 190));
      paramGraphics.fillRect(this.clr3.x, this.clr3.y, this.clr3.width, this.clr3.height);
      paramGraphics.setColor(new Color(65, 0, 0, 190));
      paramGraphics.fillRect(this.clr4.x, this.clr4.y, this.clr4.width, this.clr4.height);
      paramGraphics.setColor(new Color(65, 0, 65, 190));
      paramGraphics.fillRect(this.clr5.x, this.clr5.y, this.clr5.width, this.clr5.height);
      paramGraphics.setColor(new Color(82, 41, 0, 190));
      paramGraphics.fillRect(this.clr6.x, this.clr6.y, this.clr6.width, this.clr6.height);
      paramGraphics.setColor(Color.WHITE);
      paramGraphics.drawString("T", this.cr1.x + 4, this.cr1.y + 12);
      if (WhiteBearAIOMagic.access$1200(this.this$0) == 0) {
        paramGraphics.setColor(new Color(0, 0, 0, 160));
        paramGraphics.fillRect(this.logOut.x, this.logOut.y, this.logOut.width, this.logOut.height);
        paramGraphics.setColor(Color.YELLOW);
        paramGraphics.drawString("Log Out", this.logOut.x + 6, this.logOut.y + 12);
      }
      if (WhiteBearAIOMagic.access$3900(this.this$0) >= 1) break;
      paramGraphics.setColor(new Color(0, 0, 0, 160));
      paramGraphics.fillRect(this.logOut.x + 125, this.logOut.y, this.logOut.width + 53, this.logOut.height);

      paramGraphics.setColor(Color.YELLOW);
      paramGraphics.drawString("Take Screenshot", this.logOut.x + 131, this.logOut.y + 12);
    }

    if (WhiteBearAIOMagic.access$3900(this.this$0) > 1) {
      proggiePaint(paramGraphics);
    }
    if (WhiteBearAIOMagic.access$3900(this.this$0) == 400) {
      WhiteBearAIOMagic.access$3902(this.this$0, 398);
    }
    if ((WhiteBearAIOMagic.access$3900(this.this$0) < 398) && (WhiteBearAIOMagic.access$3900(this.this$0) > 0))
      WhiteBearAIOMagic.access$3920(this.this$0, 1);
  }

  public void saveStats()
  {
    if ((WhiteBearAIOMagic.access$4000(this.this$0).getCurrentLevel(6) != 0) && (WhiteBearAIOMagic.access$4100(this.this$0).isLoggedIn())) {
      this.nf.setMinimumIntegerDigits(2);

      this.start_exp = WhiteBearAIOMagic.access$4200(this.this$0).getCurrentExp(6);
      this.start_lvl = WhiteBearAIOMagic.access$4300(this.this$0).getCurrentLevel(6);
      this.savedStats = true;
    }
  }

  public int paintTab() {
    Point localPoint = new Point(this.p);
    if (this.mouseWatcher.isAlive())
      return this.currentTab;
    if ((this.this$0.thePainter.currentTab == 4) && (WhiteBearAIOMagic.access$4400(this.this$0).isLoggedIn() == true)) {
      if (this.clr1.contains(localPoint)) {
        WhiteBearAIOMagic.access$4502(this.this$0, "Black");
        setColour();
      }
      if (this.clr2.contains(localPoint)) {
        WhiteBearAIOMagic.access$4502(this.this$0, "Blue");
        setColour();
      }
      if (this.clr3.contains(localPoint)) {
        WhiteBearAIOMagic.access$4502(this.this$0, "Green");
        setColour();
      }
      if (this.clr4.contains(localPoint)) {
        WhiteBearAIOMagic.access$4502(this.this$0, "Red");
        setColour();
      }
      if (this.clr5.contains(localPoint)) {
        WhiteBearAIOMagic.access$4502(this.this$0, "Purple");
        setColour();
      }
      if (this.clr6.contains(localPoint)) {
        WhiteBearAIOMagic.access$4502(this.this$0, "Brown");
        setColour();
      }
      if (this.cr1.contains(localPoint)) {
        this.mouseWatcher = new Thread(new WhiteBearAIOMagic.WhiteBearPaint.MouseWatcher(this, this.cr1));
        this.mouseWatcher.start();
        if (WhiteBearAIOMagic.access$3600(this.this$0) == true)
          WhiteBearAIOMagic.access$3602(this.this$0, false);
        else {
          WhiteBearAIOMagic.access$3602(this.this$0, true);
        }
      }
    }
    if (this.r1.contains(localPoint)) {
      this.mouseWatcher = new Thread(new WhiteBearAIOMagic.WhiteBearPaint.MouseWatcher(this, this.r1));
      this.mouseWatcher.start();
      if (this.currentTab == -1) {
        return this.lastTab;
      }
      this.lastTab = this.currentTab;
      return -1;
    }

    if (this.currentTab == -1)
      return this.currentTab;
    if (this.r2.contains(localPoint))
      return 0;
    if (this.r3.contains(localPoint))
      return 1;
    if (this.r4.contains(localPoint))
      return 2;
    if (this.r5.contains(localPoint))
      return 3;
    if (this.r6.contains(localPoint))
      return 4;
    return this.currentTab;
  }

  public void drawPaint(Graphics paramGraphics, Rectangle paramRectangle) {
    paramGraphics.setColor(this.normalBack);
    paramGraphics.fillRect(this.r1.x, this.r1.y, this.r1.width, this.r1.height);
    paramGraphics.fillRect(this.r2.x, this.r2.y, this.r2.width, this.r2.height);
    paramGraphics.fillRect(this.r3.x, this.r3.y, this.r3.width, this.r3.height);
    paramGraphics.fillRect(this.r4.x, this.r4.y, this.r4.width, this.r4.height);
    paramGraphics.fillRect(this.r5.x, this.r5.y, this.r5.width, this.r5.height);
    paramGraphics.fillRect(this.r6.x, this.r6.y, this.r6.width, this.r6.height);
    paramGraphics.fillRect(paramRectangle.x, paramRectangle.y, paramRectangle.width, paramRectangle.height);
    paramGraphics.fillRect(this.r.x, this.r.y, this.r.width, this.r.height);
    paramGraphics.setColor(this.fonts);
    paramGraphics.setFont(new Font(this.font, 0, 10));
    drawString(paramGraphics, "X", this.r1, 4);
    drawString(paramGraphics, "Main", this.r2, 4);
    drawString(paramGraphics, "Info", this.r3, 4);
    drawString(paramGraphics, "Stats", this.r4, 4);
    drawString(paramGraphics, "Etc", this.r5, 4);
    drawString(paramGraphics, "Setting", this.r6, 4);
    paramGraphics.setColor(this.normalBack);
  }

  public void drawStat(Graphics paramGraphics, int paramInt1, int paramInt2) {
    paramGraphics.setFont(new Font(this.font, 0, 11));
    paramGraphics.setColor(new Color(97, 97, 97, 185));
    int i = this.sb1.height / 2;
    paramGraphics.fillRect(this.sb1.x, this.sb1.y, this.sb1.width, i);
    paramGraphics.setColor(new Color(60, 60, 60, 185));
    paramGraphics.fillRect(this.sb1.x, this.sb1.y + i, this.sb1.width, i);
    int j = WhiteBearAIOMagic.access$4600(this.this$0).getPercentToNextLevel(6);
    paramGraphics.setColor(new Color(255 - 2 * j, (int)(1.7D * j), 0, 150));

    paramGraphics.fillRect(this.sb1.x + 2, this.sb1.y + 2, (int)((this.sb1.width - 4) / 100.0D * j), this.sb1.height - 4);

    paramGraphics.setColor(Color.WHITE);
    paramGraphics.drawString("Magic", this.sb1.x + 3, this.sb1.y + 12);
    drawStringEnd(paramGraphics, j + "%", this.sb1, -3, 4);
  }

  public void drawStats(Graphics paramGraphics) {
    if (this.savedStats == true)
    {
      this.gained_exp = (WhiteBearAIOMagic.access$4700(this.this$0).getCurrentExp(6) - this.start_exp);
      this.gained_lvl = (WhiteBearAIOMagic.access$4800(this.this$0).getCurrentLevel(6) - this.start_lvl);
      drawStat(paramGraphics, 1, 1);
    }
  }

  public void setColour() {
    if (WhiteBearAIOMagic.access$4500(this.this$0).equals("Blue")) {
      this.fonts = Color.YELLOW;
      this.normalBack = new Color(0, 0, 70, 230);
      this.hiddenPaint = new Color(0, 0, 70, 120);
      this.lines = new Color(19, 51, 200, 200);
    } else if (WhiteBearAIOMagic.access$4500(this.this$0).equals("Green")) {
      this.fonts = Color.YELLOW;
      this.normalBack = new Color(0, 70, 0, 230);
      this.hiddenPaint = new Color(0, 70, 0, 120);
      this.lines = new Color(19, 200, 51, 200);
    } else if (WhiteBearAIOMagic.access$4500(this.this$0).equals("Red")) {
      this.fonts = Color.YELLOW;
      this.normalBack = new Color(65, 0, 0, 230);
      this.hiddenPaint = new Color(65, 0, 0, 120);
      this.lines = new Color(205, 0, 0, 200);
    } else if (WhiteBearAIOMagic.access$4500(this.this$0).equals("Purple")) {
      this.fonts = new Color(255, 122, 224, 250);
      this.normalBack = new Color(65, 0, 65, 230);
      this.hiddenPaint = new Color(65, 0, 65, 120);
      this.lines = new Color(180, 0, 180, 200);
    } else if (WhiteBearAIOMagic.access$4500(this.this$0).equals("Brown")) {
      this.fonts = new Color(51, 204, 0, 250);
      this.normalBack = new Color(82, 41, 0, 230);
      this.hiddenPaint = new Color(82, 41, 0, 120);
      this.lines = new Color(142, 91, 0, 200);
    } else {
      this.fonts = Color.WHITE;
      this.normalBack = new Color(0, 0, 0, 230);
      this.hiddenPaint = new Color(0, 0, 0, 130);
      this.lines = new Color(100, 100, 100, 200);
    }
  }

  public void drawString(Graphics paramGraphics, String paramString, Rectangle paramRectangle, int paramInt)
  {
    FontMetrics localFontMetrics = paramGraphics.getFontMetrics();
    Rectangle2D localRectangle2D = localFontMetrics.getStringBounds(paramString, paramGraphics);
    int i = (int)localRectangle2D.getWidth();
    paramGraphics.drawString(paramString, paramRectangle.x + (paramRectangle.width - i) / 2, paramRectangle.y + (paramRectangle.height / 2 + paramInt));
  }

  public void drawStringEnd(Graphics paramGraphics, String paramString, Rectangle paramRectangle, int paramInt1, int paramInt2)
  {
    FontMetrics localFontMetrics = paramGraphics.getFontMetrics();
    Rectangle2D localRectangle2D = localFontMetrics.getStringBounds(paramString, paramGraphics);
    int i = (int)localRectangle2D.getWidth();
    paramGraphics.drawString(paramString, paramRectangle.x + paramRectangle.width - i + paramInt1, paramRectangle.y + (paramRectangle.height / 2 + paramInt2));
  }

  public void drawStringMain(Graphics paramGraphics, String paramString1, String paramString2, Rectangle paramRectangle, int paramInt1, int paramInt2, int paramInt3, boolean paramBoolean)
  {
    FontMetrics localFontMetrics = paramGraphics.getFontMetrics();
    Rectangle2D localRectangle2D = localFontMetrics.getStringBounds(paramString2, paramGraphics);

    int i = (int)localRectangle2D.getWidth();
    if (paramBoolean) {
      paramGraphics.drawString(paramString1, paramRectangle.x + paramInt1, paramRectangle.y + paramInt2 + paramInt3 * 17);

      paramGraphics.drawString(paramString2, paramRectangle.x + paramRectangle.width / 2 - i - paramInt1, paramRectangle.y + paramInt2 + paramInt3 * 17);
    }
    else {
      paramGraphics.drawString(paramString1, paramRectangle.x + paramRectangle.width / 2 + paramInt1, paramRectangle.y + paramInt2 + paramInt3 * 17);

      paramGraphics.drawString(paramString2, paramRectangle.x + paramRectangle.width - i - paramInt1, paramRectangle.y + paramInt2 + paramInt3 * 17);
    }
  }

  public String formatTime(long paramLong)
  {
    long l1 = paramLong / 1000L;
    long l2 = l1 / 60L;
    long l3 = l2 / 60L;
    long l4 = l1 % 60L;
    long l5 = l2 % 60L;
    long l6 = l3;
    return this.nf.format(l6) + ":" + this.nf.format(l5) + ":" + this.nf.format(l4);
  }
}